Do not use toArray method without arguments. Since the return type is Object[], ClassCastException will be thrown when casting it to a different array type.
<p>Examples:</p>
<pre>
    Negative example:
    Integer[] a = (Integer [])c.toArray();

    Positive example：
    Integer[] b = (Integer [])c.toArray(new Integer[c.size()]);
</pre>